using CodePlex.DnD4eCampaignManager.DnD4e.Enums;
using CodePlex.DnD4eCampaignManager.DnD4e.Interfaces;

namespace CodePlex.DnD4eCampaignManager.DnD4e
{
    public abstract class Combatant : ICombatant
    {
        protected IAbilities _abilities;
        protected IDefenses _defenses;
        protected IHealingSurges _healingSurges;
        protected IInitiative _initiative;
        protected IMovement _movement;
        protected ISenses _senses;
        public abstract string DisplayName { get; }

        public int AbilityCharisma
        {
            get { return _abilities.AbilityCharisma; }
            set { _abilities.AbilityCharisma = value; }
        }

        public int AbilityConstitution
        {
            get { return _abilities.AbilityConstitution; }
            set { _abilities.AbilityConstitution = value; }
        }

        public int AbilityDexterity
        {
            get { return _abilities.AbilityDexterity; }
            set { _abilities.AbilityDexterity = value; }
        }

        public int AbilityIntelligence
        {
            get { return _abilities.AbilityIntelligence; }
            set { _abilities.AbilityIntelligence = value; }
        }

        public int AbilityStrength
        {
            get { return _abilities.AbilityStrength; }
            set { _abilities.AbilityStrength = value; }
        }

        public int AbilityWisdom
        {
            get { return _abilities.AbilityWisdom; }
            set { _abilities.AbilityWisdom = value; }
        }

        public int ActionPoints { get; set; }
        public string Conditions { get; set; }
        public CreatureSize CreatureSize { get; set; }

        public int DefenseArmorClass
        {
            get { return _defenses.DefenseArmorClass; }
            set { _defenses.DefenseArmorClass = value; }
        }

        public int DefenseFortitude
        {
            get { return _defenses.DefenseFortitude; }
            set { _defenses.DefenseFortitude = value; }
        }

        public int DefenseReflex
        {
            get { return _defenses.DefenseReflex; }
            set { _defenses.DefenseReflex = value; }
        }

        public int DefenseWillpower
        {
            get { return _defenses.DefenseWillpower; }
            set { _defenses.DefenseWillpower = value; }
        }

        public int HitPointsBloodied
        {
            get { return _healingSurges.HitPointsBloodied; }
        }

        public int HitPointsCurrent
        {
            get { return _healingSurges.HitPointsCurrent; }
            set { _healingSurges.HitPointsCurrent = value; }
        }

        public int HitPointsMaximum
        {
            get { return _healingSurges.HitPointsMaximum; }
            set { _healingSurges.HitPointsMaximum = value; }
        }

        public int HitPointsTemporary
        {
            get { return _healingSurges.HitPointsTemporary; }
            set { _healingSurges.HitPointsTemporary = value; }
        }

        public int InitiativeModifier
        {
            get { return _initiative.InitiativeModifier; }
            set { _initiative.InitiativeModifier = value; }
        }

        public int InitiativeRoll
        {
            get { return _initiative.InitiativeRoll; }
            set { _initiative.InitiativeRoll = value; }
        }

        public int InitiativeScore
        {
            get { return _initiative.InitiativeScore; }
            set { _initiative.InitiativeScore = value; }
        }

        public bool IsBloodied
        {
            get { return _healingSurges.IsBloodied; }
        }

        public int MovementSpeed
        {
            get { return _movement.MovementSpeed; }
            set { _movement.MovementSpeed = value; }
        }

        public string MovementSpeedOther
        {
            get { return _movement.MovementSpeedOther; }
            set { _movement.MovementSpeedOther = value; }
        }

        public int MovementStealth
        {
            get { return _movement.MovementStealth; }
            set { _movement.MovementStealth = value; }
        }

        public string Name { get; set; }

        public int SensesInsight
        {
            get { return _senses.SensesInsight; }
            set { _senses.SensesInsight = value; }
        }

        public int SensesInsightPassive
        {
            get { return _senses.SensesInsightPassive; }
            set { _senses.SensesInsightPassive = value; }
        }

        public string SensesOther
        {
            get { return _senses.SensesOther; }
            set { _senses.SensesOther = value; }
        }

        public int SensesPerception
        {
            get { return _senses.SensesPerception; }
            set { _senses.SensesPerception = value; }
        }

        public int SensesPerceptionPassive
        {
            get { return _senses.SensesPerceptionPassive; }
            set { _senses.SensesPerceptionPassive = value; }
        }

        public string SpecialQualities { get; set; }
        public string Tactics { get; set; }
        public abstract string FormatCombatantForDisplay();

        public void Damage(int hitPointsLost)
        {
            _healingSurges.Damage(hitPointsLost);
        }

        public void Heal(int hitPointsRecovered)
        {
            _healingSurges.Heal(hitPointsRecovered);
        }
    }
}